<template>
  <div>
    <div
      class="singer"
      v-for="item in songs"
      :key="item.id"
      @click="toAlbumList(item.album.id)"
    >
      <div class="img">
        <img src="../../static/img/szhuan.jpg" alt="" />
      </div>
      <div class="text">
        <p class="van-ellipsis">{{ item.album.name }}</p>
        <p class="van-ellipsis">
          演唱：<em class="highart">{{ item.artists[0].name }}</em> - 共{{ item.album.size }}首
        </p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "MusicSearchAlbum",
  props: ["songs"],

  data() {
    return {};
  },

  mounted() {},

  methods: {
    toAlbumList(id) {
      this.$router.push({
        path: "MusicAlbumList",
        query: { id },
      });
    },
  },
};
</script>

<style lang="less" scoped>
// 专辑
.singer {
  display: flex;
  height: 3.125rem;
  margin: 0.625rem;
  // background-color: red;
  .img {
    width: 3.125rem;
    height: 3.125rem;
    line-height: 3.125rem;
    text-align: center;
    background-color: purple;
    img {
      width: 100%;
      height: 100%;
      border-radius: 0.3125rem;
    }
  }
  .text {
    flex: 1;
    max-width: 15.625rem;
    padding-left: 0.9375rem;
    text-align: left;
    p {
      .highart{
        color:#4fc08d;
      }
      line-height: 1.5625rem;
    }
    p:nth-child(1) {
      font-size: 1rem;
      color: black;
      font-weight: 600;
    }
    p:nth-child(2) {
      font-size: 0.75rem;
      color: #929292;
    }
  }
}
</style>